package com.example.chapter_1_17.service;

import com.example.chapter_1_17.entity.Person;
import com.example.chapter_1_17.mapper.PersonMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

//声明为服务层
@Service
public class PersonServiceImplm implements PersonService{

    private final PersonMapper personMapper;

    public PersonServiceImplm(PersonMapper personMapper) {
        this.personMapper = personMapper;
    }

    @Override
    public List<Person> selectSan() {
        return personMapper.selectSan();
    }

    @Override
    public List<Person> selectList() {
        return personMapper.selectList(null);
    }
}
